#ifndef WORDLEGAME_H
#define WORDLEGAME_H

#include <QWidget>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QGridLayout>

class WordleGame : public QWidget
{
    Q_OBJECT

public:
    explicit WordleGame(QWidget *parent = nullptr);

private slots:
    void checkGuess();
    void playAgain();
    void quitGame();

private:
    void startNewGame();
    bool isLetterRepeated(const QString& word, QChar letter);

    QStringList wordList;
    QString targetWord;
    QString hiddenTargetWord;
    QLineEdit *guessLineEdit;
    QPushButton *checkButton;
    QPushButton *playAgainButton;
    QPushButton *quitButton;
    QLabel *resultLabel;
    QLabel *guessesLeftLabel;
    int guessesLeft;
};

#endif // WORDLEGAME_H
